package br.com.sisvendas.util;

import javax.swing.JOptionPane;

import org.hibernate.Session;

public class Conecta {
	public static void main(String []args){
		Session sessao =null;
		try{
			sessao =  HibernateUtil.getSession().openSession();
			JOptionPane.showMessageDialog(null, "Conectou!!");
		}finally{
		sessao.close();//finaliza	
		JOptionPane.showMessageDialog(null,"Fechou conexao");
		}
	}
}
